import React from "react"
import './HOC.css'
function HOC(WrapperdComponent) {
  return class HOC extends React.Component {

    refConponent = (instance) => {
      console.log('instance', instance);
      // instance.getName()
    }

    render() {
      return (
        <div className="HOCExplain">
          <div className='header'>
            <span>开启高阶组件学习</span>
          </div>
          <div className='container'>
            <WrapperdComponent
            // ref={this.refConponent} 
            />
          </div>
          <div className="footer">学无止境</div>
        </div>
      )
    }
  }
}

export default HOC